package com.hundun.hddeal.dao;

import com.hundun.hddeal.entity.AdUser;
import com.hundun.hddeal.entity.User;
import org.apache.ibatis.annotations.Param;
import org.springframework.context.annotation.Primary;
import org.springframework.stereotype.Component;

/**
 * 广告用户接口
 * @author 谢
 */
@Component
public interface AdUserMapper {

    int deleteByPrimaryKey(Long id);

    int insert(AdUser record);

    int insertSelective(AdUser record);

    AdUser selectByPrimaryKey(Long id);

    int updateByPrimaryKeySelective(AdUser record);

    int updateByPrimaryKey(AdUser record);

    AdUser selectByAdUserId(String adUserId);

    AdUser findAdUserById(String adId);

    int updateMoney(@Param("adId") String adId,@Param("money") Double money);

    int updateIceMoney(@Param("adId") String adId,@Param("money") Double money);

    int selectAdUserCount();

    int resetAdPwd(@Param("NewPwd")String newPwd,@Param("adId")String adId,@Param("NewPayPwd")String newPayPwd);

    /**通过邀请码查询分组信息*/
    User selectUserCode(@Param("userCode") String userCode);

    AdUser selectPhone(@Param("adPhone")String adPhone);

    AdUser loginForPhone(@Param("adPhone")String adPhone);

}